<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>
    var A = { a: 1};
    A.add = function(b){
        console.log(this.a+b);
    };
    A.add(3);
    var B = { a:4};
    A.add.apply(B, [3]);
</script>
</body>
</html>